package com.ze.sys.db.controller;

import com.ze.bean.Result;
import com.ze.sys.db.BackUpDataSceneEnum;
import com.ze.sys.db.service.BackUpService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@Slf4j
public class BackUpDataController {

    @Resource
    private BackUpService backUpService;

    @GetMapping("/backUpData")
    public Result backUpData() {
        backUpService.backUp(BackUpDataSceneEnum.USER_FORWARD);
        return Result.ok("数据归档成功");
    }
}
